﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SearchArchive : System.Web.UI.Page
{
    public string PageNumber { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            foreach (string key in Request.QueryString)
            {
                switch (key.ToLower())
                {
                    case "page":
                        PageNumber = (Request.QueryString[key]);
                        break;                   
                    default:
                        break;
                }
            }
            GenerateTitle();
        }
        
    }

    private void GenerateTitle()
    {
        if (!string.IsNullOrEmpty(PageNumber))
        {
            this.Title = "Най-Търсени" + " - страница " + PageNumber;
        }
    }
}
